package Base64;

import sun.misc.BASE64Encoder;

import java.io.UnsupportedEncodingException;

public class Base64 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String content= "需要 base64编码的内容";
        BASE64Encoder base64Encoder = new BASE64Encoder();
        String encodeedStr = base64Encoder.encode(content.getBytes("UTF-8"));
    }
}
